package mipushdemo.xiaomi.com.diyitonghang.dao;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import mipushdemo.xiaomi.com.diyitonghang.data.bean.TabBean;
import mipushdemo.xiaomi.com.diyitonghang.data.bean.TabXBean;

import mipushdemo.xiaomi.com.diyitonghang.dao.TabBeanDao;
import mipushdemo.xiaomi.com.diyitonghang.dao.TabXBeanDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig tabBeanDaoConfig;
    private final DaoConfig tabXBeanDaoConfig;

    private final TabBeanDao tabBeanDao;
    private final TabXBeanDao tabXBeanDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        tabBeanDaoConfig = daoConfigMap.get(TabBeanDao.class).clone();
        tabBeanDaoConfig.initIdentityScope(type);

        tabXBeanDaoConfig = daoConfigMap.get(TabXBeanDao.class).clone();
        tabXBeanDaoConfig.initIdentityScope(type);

        tabBeanDao = new TabBeanDao(tabBeanDaoConfig, this);
        tabXBeanDao = new TabXBeanDao(tabXBeanDaoConfig, this);

        registerDao(TabBean.class, tabBeanDao);
        registerDao(TabXBean.class, tabXBeanDao);
    }
    
    public void clear() {
        tabBeanDaoConfig.clearIdentityScope();
        tabXBeanDaoConfig.clearIdentityScope();
    }

    public TabBeanDao getTabBeanDao() {
        return tabBeanDao;
    }

    public TabXBeanDao getTabXBeanDao() {
        return tabXBeanDao;
    }

}
